<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    {% block title %}
    <title>投放管理系统</title>
    {% endblock %}
    <!-- Bootstrap -->
    <link href="{{ url_for('vipadmin.static', filename='css/bootstrap.min.css', _external=True) }}" rel="stylesheet">
    <link href="{{ url_for('vipadmin.static', filename='css/style.css', _external=True) }}" rel="stylesheet">

    {% block extracss %}
        {# 其它页面的css #}
    {% endblock %}

  </head>
  <body>
    {% block top %}
        {% include 'base/top.html' %}
    {% endblock %}

    <div class="container-fluid">

      {% for cat, msg in get_flashed_messages(with_categories=True) %}
      <div class="alert alert-{{ cat }} alert-dismissible" role="alert" id="hidden_view">
        <button type="button" class="close" data-dismiss="alert" aria-label="Close">
            <span aria-hidden="true">&times;</span></button>
        <strong>{{ msg }}</strong>
      </div>
      {% endfor %}

      {% block container %}
      <div class="row">
        <div class="col-sm-3 col-md-2 sidebar">
          {% block sidebar %}

              {% include 'base/sidebar.html' %}
          {% endblock %}
        </div>
        <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
          {% block content %}
              {# 删除警告框提示 #}
            <div class="modal fade" id="confirm-delete" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
                aria-hidden="true">
                <div class="modal-dialog">
                    <div class="modal-content">
                        <div class="modal-header">
                            请确认
                        </div>
                        <div class="modal-body">
                            确认删除吗？
                        </div>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                            <a class="btn btn-danger btn-ok">确认</a>
                        </div>
                    </div>
                </div>
            </div>
          {% endblock %}
        </div>
      </div> <!-- //end div.row -->
      {% endblock %}
    </div>


    <script src="{{ url_for('vipadmin.static', filename='js/jquery.min.js', _external=True) }}"></script>
    <script src="{{ url_for('vipadmin.static', filename='js/bootstrap.min.js', _external=True) }}"></script>
    <script>
        $("td,th").addClass("text-center");
        $('#confirm-delete').on('show.bs.modal', function (e) {
            $(this).find('.btn-ok').attr('href', $(e.relatedTarget).data('href'));
        });
    </script>
    {% block extrajs %}
        {# 其它页面的js #}
    {% endblock %}
  </body>
</html>